Ext.define('Wgo.view.FestivalList', {
    extend: 'Ext.navigation.View',
    xtype: 'festivallist',
    requires: [
        'Wgo.store.FestivalStore',
        'Ext.dataview.List',
        'Wgo.view.FestivalDetail'
    ],
    config: {
        iconCls: 'favorites',
        title: 'Festivals',
        items: [
            {
            title: 'Festivals',
            xtype: 'list',
            //pinHeaders: true,
            onItemDisclosure: true,
            plugins: [
            {
                //http://stackoverflow.com/questions/7321446/sencha-list-paging-plugin
                xclass: 'Ext.plugin.ListPaging',
                autoPaging: true,
                // These override the text; use CSS for styling
                loadMoreText: 'Loading...',
                noMoreRecordsText: 'All messages loaded'
            }
            ],
            itemTpl: '<div class="vm-festival"><div><span class="vm-festtival-title">{name}</span><span class="vm-festtival-timings">{period}</span><div class="vm-festtival-content">{details}</div></div></div>',
            store: 'FestivalStore'            ,
            listeners: {
                itemtap: function(list, index, item, record) {
                    console.log(Wgo.app.logoText);
                    this.up('festivallist').push({
                        //xtype: record.data.xtype
                    });
                }
            }
        },
            {
                xtype: 'header',
                docked: 'top'
            }]
    }
});